package com.songjiakang.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageInfo;
import com.songjiakang.service.MoneyService;

@Controller
public class MoneyController {
	@Autowired
	private MoneyService service;
	
	//列表
	@RequestMapping("list")
	public String list(Model model,@RequestParam(defaultValue="1")Integer pageNum,@RequestParam(defaultValue="3")Integer pageSize){
		PageInfo info=service.list(pageNum,pageSize);
		model.addAttribute("info", info);
		return "list";
	}
	@RequestMapping("toadd")
	public String toadd(){
		
		return "add";
	}
}
